<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<img id="img" src="" >
</body>
</html>
<script>
    var url="${url}";
    if(url!=null){
        document.getElementById("img").src="${request.contextPath}/${url}";}else{
        document.getElementById("img").innerHTML ="无图片";
    }

</script>